Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance search customization #2591

Merged
merged 33 commits into from
Feb 11, 2025
Merged

Enhance search customization #2591

merged 33 commits into from
Feb 11, 2025

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Jan 11, 2025

Question Answer
JIRA Ticket N/A
Versions 4.6
Edition All
  • Merge ElasticSearch and Solr custom criterion, sort clause and aggregation.
    Criteria, sort clauses and aggregations don't depend on the search engine, only their visitors and other handlers do.
  • Move more code to code_samples/ files.
  • Fix aggregation service tagging (priority_i exists only on document_type_id:location).
  • Fix class names to PriorityRangeAggregation*.
  • Avoid truncated "code_samples/ change report" comment truncation when there is more than 65536 characters.

Preview

  • Create custom Search Criterion > Create Criterion class
    • Before Two tabs, almost the same code, only the namespaces are different, wrongly specializing the criterion.
    • After One tab, a generic namespace.
  • Create custom Search Criterion > Create Criterion visitor
    • Before uses exif_camera_manufacturer_id without introducing it.
    • After define exif_camera_manufacturer_id as being a customization and links to index customization pages.
  • Create custom Sort Clause > Create Sort Clause class
  • Create custom Aggregation > Create aggregation class
    • Before doesn't have a section title for the classes creation.
    • After has a generic aggregation for location only, links to the PHP API Reference, an intro for Solr's key mapper, and it doesn't use the ibexa.search.solr.query.content.aggregation.visitor tag as priority_i only exists in location document, which is now explained.
  • Create custom Aggregation > Create aggregation visitor
    • Before has a PriorityAggregationVisitor.
    • After has PriorityRangeAggregationVisitor, and links to parent contracts in the PHP API Reference.
  • Create custom Aggregation > Create result extractor
    • Before has a PriorityAggregationResultExtractor, and a wrong Solr parent FQCN.
    • After has PriorityRangeAggregationResultExtractor, and links to parent contracts in the PHP API Reference.
  • Solr document field mappers
    • Before text is OK.
    • After has no text change, but just add few links to PHP API Reference.
  • Index custom Elasticsearch data
    • Before pretends that to register the subscriber as a service is mandatory which is wrong.
    • After has links to PHP API Reference, and reminds that service registering is only necessary when auto-configuration doesn't work.
  • Customize Elasticsearch index structure
    • Before just describes the default strategy.
    • After clarifies that CompositeGroupResolver is the default strategy.
  • Manipulate Elasticsearch query
    • Before
    • After fixes namespace, links to PHP API Reference, indicates when to manually set subscriber as a service.
  • Configure Elasticsearch

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

Sorry, something went wrong.

adriendupuis and others added 25 commits January 11, 2025 12:35
…ation

Criteria, sort clauses and aggregations don't depend on the search engine, only their visitors and other handlers do.
Mimic criterion and sort clause pages' structure.
priority_i is available only on locations
*.query.content.* tags musn't be used with this example
…solver as default

Don't make the reader guess it from default strategy description, just label it.
@adriendupuis adriendupuis marked this pull request as ready for review February 10, 2025 16:45
@adriendupuis adriendupuis requested a review from mnocon February 11, 2025 09:18
Copy link
Contributor

@mnocon mnocon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Just some small, optional suggestions

adriendupuis and others added 2 commits February 11, 2025 16:37
Copy link

code_samples/ change report

Report's diff is too long to be displayed in a comment.

Download colorized diff

@adriendupuis adriendupuis merged commit c765208 into master Feb 11, 2025
4 of 7 checks passed
@adriendupuis adriendupuis deleted the enh-custom-search branch February 11, 2025 15:51
adriendupuis added a commit that referenced this pull request Feb 11, 2025
* Merge ElasticSearch and Solr custom criterion, sort clause and aggregation.
Criteria, sort clauses and aggregations don't depend on the search engine, only their visitors and other handlers do.

(cherry picked from commit c765208)

---------

Co-authored-by: adriendupuis <adriendupuis@users.noreply.github.com>
Co-authored-by: Marek Nocoń <mnocon@users.noreply.github.com>
@adriendupuis adriendupuis mentioned this pull request Feb 12, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants